home *** CD-ROM | disk | FTP | other *** search
/ PCNet 1998 June / PCnet Haziran 1998.iso / Internet / Tools / ANJAVA10.ZIP / DATA1.CAB / Program_Executable_Files / Applet / plasma / plasma3.txt < prev    next >
Encoding:
Text File  |  1998-04-23  |  6.4 KB  |  121 lines

  1.  
  2.           AnfyPlasma 2.1 - Copyright (C) by Fabio Ciucci 1996/98
  3.  
  4.  
  5. This applet can generate and animate a realtime "plasma" effect, well know
  6. in the "demo scene" contest.
  7. Remember that are needed both Plasma3.class , Lware.class and anfy.class.
  8. You must upload these 3 .class files and insert the <applet> tag on your
  9. html document to add this applet to your page.
  10. This applet is fully parametrized, so you can generate all kinds of plasma
  11. you want. Here an example of what you have to write in the html (the
  12. things anfter the ; are comments with min-max values acceptet):
  13.  
  14.  
  15. <applet code="Plasma3.class" width=192 height=192>  ; Name, Width, Height
  16. <param name=credits value="Applet by Fabio Ciucci (www.anfiteatro.it/java.html)">
  17. <param name=regcode value="NO">         ; Register code (if you have it)
  18. <param name=reglink value="NO">         ; URL where go optionally when clicked
  19. <param name=regnewframe value="YES">    ; Reglink opened in new frame?
  20. <param name=regframename value="_blank"> ; Name of new frame for reglink
  21. <param name=statusmsg value="Plasma applet">  ; Statusbar message
  22. <param name=res value="3">                ; resolution (1-8)
  23. <param name=gen1 value="43">              ; generator1 (8-2000)
  24. <param name=gen2 value="31">              ; generator2 (3-256)
  25. <param name=gen3 value="36">              ; generator3 (3-256)
  26. <param name=red1 value="0">               ; Red1 (0-255)
  27. <param name=red2 value="127">             ; Red2 (0-255)
  28. <param name=red3 value="1">               ; Red3 (1-8)
  29. <param name=green1 value="127">           ; Green1 (0-255)
  30. <param name=green2 value="127">           ; Green2 (0-255)
  31. <param name=green3 value="2">             ; Green3 (1-8)
  32. <param name=blue1 value="127">            ; Blue1 (0-255)
  33. <param name=blue2 value="127">            ; Blue2 (0-255)
  34. <param name=blue3 value="1">              ; Blue3 (1-8)
  35. <param name=speed value="1">              ; Speed (1-8)
  36. <param name=textscroll value="plasmscr.txt"> ; File for scrolltext or "NO"
  37. <param name=textoffset value="140">          ; Txtscroll y offset
  38. <param name=textspeed value="1">          ; Txtscroll speed
  39. <param name=textfont value="Arial">       ; Txtscroll font name
  40. <param name=textbold value="NO">          ; Txtscroll bold ("YES" or "NO")
  41. <param name=textsize value="24">          ; Txtscroll font size
  42. <param name=textshadow value="YES">       ; Txtscroll shadow ("YES" or "NO")
  43. <param name=TextColR value="200">         ; Txtscroll color (red component)
  44. <param name=TextColG value="255">         ; Txtscroll color (green component)
  45. <param name=TextColB value="190">         ; Txtscroll color (blue component)
  46. <param name=TextSColR value="20">         ; Txtscroll shadow col. (red c.)
  47. <param name=TextSColG value="20">         ; Txtscroll shadow col. (green c.)
  48. <param name=TextSColB value="50">         ; Txtscroll shadow col. (blue c.)
  49. <param name=TextJumpAmp value="0">        ; Txtscroll jump aplitude
  50. <param name=TextJumpSpd value="0">        ; Txtscroll jump speed
  51. <param name=TextSineAmp value="0">        ; Txtscroll sineshape amplitude        
  52. <param name=TextSineSpd value="0">        ; Txtscroll sineshape movement
  53. <param name=TextSineAngle value="0">      ; Txtscroll sineangle / pixel  
  54. <param name=memdelay value="1000">        ; Memory deallocation delay
  55. <param name=priority value="3">           ; Task priority (1..10)
  56. <param name=fixnetscape value="NO">       ; Fix Netscape 3.0 bug ("YES","NO")
  57. <param name=MinSYNC value="10">           ; Min. milliseconds/frame for sync
  58. Sorry, your browser doesn't suppor Java.  ; Message for no java browsers.
  59. </applet>                                 ; End of applet tag
  60.  
  61.  
  62.                              ---------
  63.  
  64.  
  65. Here detailed instructions about how to change parameters:
  66.  
  67.  
  68. The credits parameter can't be changed otherwise the applet will not work.
  69.  
  70. To activate the reg parameters read the shareware registration notes.
  71. In the "regcode" parameter you have to place the registration code you
  72. purchase from the author. If it is correct and the applet is run from the
  73. registered domain name, you can use "reglink" parameter, where you can specify
  74. an URL where bring user when the applet is clicked.
  75. If you set to "YES" regnewframe, you can specify a frame where load the
  76. reglink:
  77.  
  78. "_blank"  : To load the link in a new blank unnamed browser window.
  79. "_self"   : To load the link into the same window the applet occupies.
  80. "_parent" : To load the link into the immediate FRAMESET parent.
  81. "_top"    : To load the link into the top body of the window.
  82.  
  83. Otherwise the frame name, for example "myframe1".
  84.  
  85. The size of the applet is determined by width and height tags.
  86.  
  87. The res parameter determine the resolution: with res=1 pixels are small,
  88. but effect is slow, with res=8 pixels are too great but effect fast.
  89. I think the best choices are 2-4.
  90.  
  91. About the plasma generators gen1,gen2,gen3, I can say that gen1 is a sort
  92. of smooth value: the min is 8 (very smooth, like fog), and the max is 2000,
  93. where all is psychedelic (too much, I think). Gen2 and Gen3 are x and y
  94. stretchers... can go from 3 (many small curves) to 256 (one great curve).
  95.  
  96. About the palette, there are 3 parameters for each Red Green Blue (RGB)
  97. component. This is more complex, but can give you much flexibility (and
  98. also the power to do many bugged palettes).
  99. The red1,green1,blue1 values (0-255) are the multipliers of tonality.
  100. The red2,green2,blue2 values (0-255) are fixed added values of tonality.
  101. The red3,green3,blue3 values (1-8) are "smoothing" values of tonality.
  102. This mean that if red1=0, then green3 value is totally disabled and
  103. all the 256 colours will have "red2" red component.
  104. Try to change this values, but some combinations make ugly palettes,
  105. you have to make some experiments. Just for who can understand, consider
  106. the formula used to make palette (r steps from 0 to 255):
  107.  
  108.       red =  (sin(r*PI*2/(256/red3  ))*red1  )+red2
  109.       green= (sin(r*PI*2/(256/green3))*green1)+green2
  110.       blue = (sin(r*PI*2/(256/blue3 ))*blue1 )+blue2
  111.  
  112. In any case a component value must exceed 255. easy, no?
  113.  
  114. The speed, from 1 to 8, is useful only when you make really large plasmas
  115. that are slow... in this case you can increase a bit this value, but
  116. the plasma will be not really more fast: it will simply skip some frames,
  117. and this add flickerings and loose smoothness (in faster machines).
  118. Please use speed = 1 when possible. Or atleast don't exceed speed=4.
  119.  
  120.  
  121.